<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="currentTime" value="<%=System.currentTimeMillis()%>"></c:set>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>
    <c:choose>
        <c:when test="${msg=='add' }">
            新增
        </c:when>
        <c:when test="${msg=='edit' }">
            编辑
        </c:when>
    </c:choose>
    ${msg }</title>
    
    <script type="text/javascript" src="static/ueditor/third-party/jquery-1.10.2.min.js"></script>  
	<script type="text/javascript" src="static/ueditor/ueditor.config.js"></script>  
	<script type="text/javascript" src="static/ueditor/ueditor.all.js"></script>  
	<script type="text/javascript" src="static/ueditor/lang/zh-cn/zh-cn.js"></script>  
	<script type="text/javascript" src="static/js/edit.js"></script>
  </head>
  <body>
      <form action="article/${msg }.do" name="Form" method="post">
          <input type="hidden" name="id" id="id" value="${article.id}"/>
          <table>
          	  <tr>
          	      <c:choose>
        <c:when test="${msg=='add' }">
            新增
        </c:when>
        <c:when test="${msg=='edit' }">
            编辑
        </c:when>
    </c:choose>
    </title>
          	  </tr>
              <tr>
                  <td>标题</td>
                  <td>
                      <input type="text" name="article_title"  value="${article.article_title}" maxlength="20" placeholder="这里输入文章标题" title="标题" style="width:98%;"/>
                  </td>
              </tr>
              <tr>
                  <td>作者</td>
                  <td><input type="text" name="article_author"  value="${article.article_author}" maxlength="20" placeholder="这里输入文章作者" title="作者" style="width:98%;"/></td>
              </tr>
              <tr>
                  <td>创建时间</td>
                  <fmt:parseDate var="create_d" value="${article.create_date}" pattern="yyyy-MM-dd HH:mm:ss"/>
                  <fmt:formatDate var="cd" value="${create_d }" pattern="yyyy-MM-dd HH:mm:ss"/>
                  <td><input type="text" name="create_date"  value="${cd}" maxlength="20" placeholder="这里输入文章创建时间" title="创建时间" style="width:98%;"/></td>
              </tr>
              <tr>
                  <td>类别</td>
                  <td><input type="text" name="article_category"  value="${article.article_category}" maxlength="20" placeholder="这里输入文章类别" title="类别" style="width:98%;"/></td>
              </tr>
              <tr>
                  <td>图片</td>
                  <td><input type="text" name="article_img"  value="${article.article_img}" maxlength="20" placeholder="这里输入文章图片" title="图片" style="width:98%;"/></td>
              </tr>
              <tr>
                  <td>内容</td>
                  <%-- <td><input type="text" name="article_content"  value="${article.article_content}" maxlength="20" placeholder="这里输入文章内容" title="内容" style="width:98%;"/></td> --%>
                  <td><textarea name="article_content" id="myEditor">${article.article_content}</textarea></td>
              </tr>
          </table>
          <button type="submit">保存</button>
      </form>
  </body>
  </html>
